1. Field of the Invention
The present invention relates to an electronic device including a plurality of microprocessors or integrated circuits (ICs) or an electronic apparatus equipped therewith. In particular, the present invention relates to an electronic device for transmitting/receiving data by serial communications to/from another electronic device connected thereto in series.
2. Description of the Related Art
Some communication systems are configured by connecting a plurality of electronic devices that can transmit/receive data by serial communications in series to an electronic device being a host controller. In such communication systems, for example, a plurality of electronic devices being communication counterparts are connected to a serial communication signal line of one communication channel, and communications are performed while switching the electronic devices being the communication counterparts. In order to select the communication counterpart, a chip select signal line (CS signal line) may be provided separately from the serial communication signal line, but in this case, the signal line increases in number, and the configuration of the communication system becomes complicated. Therefore, packet communications, which use a packet obtained by adding identification information for identifying the communication counterpart to data, are effective.
In the packet communications, for example, in the communication system in which two electronic devices are connected in series to the host controller, when the host computer transmits a packet to the electronic device located at a subsequent stage, the electronic device located at a previous stage relays the packet from the host computer to the electronic device located at a subsequent stage. Therefore, it is possible to build the communication system that suppresses the number of signal lines and a signal wire length to a minimum.
U.S. Pat. No. 6,349,389 discloses a communication system configured by a relay substation for receiving a serial communication signal which is connected to a host controller and another relay substation further connected in series to the relay substation. In this system, the host controller can communicate with each of the relay substations in a transparent manner.
U.S. Pat. No. 6,834,321 discloses a control system in which a plurality of electronic devices are connected in series to a host controller. When receiving a packet that is not addressed to itself, each of the electronic devices switches an input signal and relays the packet to another electronic device connected to the subsequent stage.
The communication system in which the plurality of electronic devices are thus connected in series to the host controller can be configured with a small number of signal lines and a short signal line length. With such a configuration, if a communication format in which each of the electronic devices returns a response to a request received from the host controller is used, the host controller can adjust a transmission timing of data received from each of the electronic devices, and hence a collision of data does not occur. However, in a case where the electronic device other than the host controller is allowed to spontaneously transmit data, there is a fear that the respective electronic devices may experience an overlap in the transmission timing, thereby causing a collision of data, and that a stable environment cannot be provided.
Therefore, there is a method of preventing the collision of data by time-division communications defining in advance a timing at which each of the electronic devices starts spontaneous communications. However, use of such time-division communications raises a problem that an effective communication rate becomes lower.